<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/ajax/libs/datapicker/datepicker3.css" th:href="@{/ajax/libs/datapicker/datepicker3.css}" rel="stylesheet"/>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-customerAttendance-add">
			<div class="form-group">
				<label class="col-sm-3 control-label">客户姓名：</label>
				<div class="col-sm-8">
					<input id="attendCustName" name="attendCustName"
						class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">手机号码：</label>
				<div class="col-sm-8">
					<input id="cellphoneNum" name="cellphoneNum" class="form-control" type="text" maxlength="11"
					onblur="Tel(this,this.value)">
				</div>
			</div>
			
			
			<div class="form-group">
				<label class="col-sm-3 control-label">所属部门：</label>
				<div class="col-sm-8">
					<input id="deptName" name="deptName" class="form-control"  readonly="true"  type="text" th:value="${dept.deptName}">
					<input id="deptId" name="deptId" class="form-control" type="hidden" th:value="${dept.deptId}">
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">业务员：</label>
				<div class="col-sm-8">
					<!-- <input id="originId" name="originId" class="form-control" type="text"> -->
					<select class="form-control" name="salesUserId" id="salesUserId"> 
						<option value="" selected="selected">请选择</option>
						<option th:each="user : ${salesList}"
							th:value="${user.userId}" th:text="${user.userName}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">年龄：</label>
				<div class="col-sm-8">
					<input id="sex" name="age" class="form-control" type="number" maxlength="3" onkeyup="this.value=this.value.match(/^[1-9]{1}[0-9]*$/)" >
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">性别：</label>
				<div class="col-sm-8">
                     <div class="radio radio-info radio-inline">
						<input type="radio" id="radio_sex" name="sex" value="0" checked="">
						<label for="radio1">男</label>
					</div>
					<div class="radio radio-danger radio-inline">
						<input type="radio" id="radio_sex" name="sex" value="1">
						<label for="radio2">女</label>
					</div>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">是否本人：</label>
				<div class="col-sm-8">
                     <div class="radio radio-success radio-inline">
						<input type="radio" id="radio_isOwnself" name="isOwnself" value="0" checked="">
						<label for="radio1">本人</label>
					</div>
					<div class="radio radio-success radio-inline">
						<input type="radio" id="radio_isOwnself" name="isOwnself" value="1">
						<label for="radio2">代咨询</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">参课时间：</label>
				<div class="col-sm-9">
					<div class="form-group">
						<div class="input-group date">
							<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input name="attendanceTime" type="text" class="form-control" value="2018-05-20">
						</div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-8 col-sm-offset-3">
					<button type="submit" class="btn btn-primary">提交</button>
				</div>
			</div>
		</form>
	</div>
	<div th:include="include::footer"></div>
	<script src="/azxcrm/module/customerAttendance/add.js" th:src="@{/azxcrm/module/customerAttendance/add.js}"> </script>
	<script src="/js/jquery-ui-1.10.4.min.js" th:src="@{/js/jquery-ui-1.10.4.min.js}"></script>
    <script src="/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
    <script src="/ajax/libs//datapicker/bootstrap-datepicker.js" th:src="@{/ajax/libs//datapicker/bootstrap-datepicker.js}"></script>
    <script src="/ajax/libs/beautifyhtml/beautifyhtml.js" th:src="@{/ajax/libs/beautifyhtml/beautifyhtml.js}"></script>
    <script>
  	  	$(".input-group.date").datepicker({todayBtn: "linked",keyboardNavigation: !1,forceParse: !1,calendarWeeks: !0,autoclose: !0});
		//手机号码验证
	    function Tel(obj,val){
	        var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
	        if(!myreg.test(val)){
	          layer.msg('请输入正确的手机号码')
	        }else{
	          return true;
	        }
	      }
   </script>
</body>
</html>
